import { RouteRecordRaw } from 'vue-router'
import { TabMain, NotFoundPage404, routeNameEnum, PageLogin } from '@/config/router_config/router_components'

// 所有的路由模块
export const allRoutes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: routeNameEnum.tabMain,
    component: TabMain,
    meta: {
      needLogin: false
    }
  },
  {
    path: '/404',
    name: routeNameEnum.page404,
    component: NotFoundPage404,
    meta: {
      needLogin: false
    }
  },
  {
    path: '/login',
    name: routeNameEnum.pageLogin,
    component: PageLogin
  },
  {
    path: '/:pathMatch(.*)',
    redirect: { name: routeNameEnum.page404 }
  }
]
